<!doctype html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



  
  
    
    
  <script src="/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/lib/pace/pace-theme-center-atom.min.css?v=1.0.2" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.1" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="jihuang,game," />








  <link rel="shortcut icon" type="image/x-icon" href="http://myyejun.oss-cn-shenzhen.aliyuncs.com/19-03-03/sucai19.png?v=5.1.1" />






<meta name="description" content="专用服务器搭建教程+mod">
<meta name="keywords" content="jihuang,game">
<meta property="og:type" content="article">
<meta property="og:title" content="【TGP】饥荒联机版专用服务器搭建教程">
<meta property="og:url" content="http://yoursite.com/2018/11/03/jihuang.html">
<meta property="og:site_name" content="叶先森、">
<meta property="og:description" content="专用服务器搭建教程+mod">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/20637217.jpg">
<meta property="og:image" content="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/21329989.jpg">
<meta property="og:image" content="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/7047361.jpg">
<meta property="og:image" content="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/3853095.jpg">
<meta property="og:image" content="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/2896621.jpg">
<meta property="og:image" content="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/618867.jpg">
<meta property="og:image" content="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/62837698.jpg">
<meta property="og:image" content="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/4915956.jpg">
<meta property="og:image" content="https://s1.ax2x.com/2018/11/03/5mXW02.jpg">
<meta property="og:image" content="https://s1.ax2x.com/2018/11/03/5mXdaa.png">
<meta property="og:image" content="https://s1.ax2x.com/2018/11/03/5mXW02.jpg">
<meta property="og:image" content="https://s1.ax2x.com/2018/11/03/5mXjfz.jpg">
<meta property="og:image" content="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/4915956.jpg">
<meta property="og:image" content="https://s1.ax2x.com/2018/11/03/5mXMTS.jpg">
<meta property="og:image" content="https://s1.ax2x.com/2018/11/03/5mXbIH.jpg">
<meta property="og:image" content="https://s1.ax2x.com/2018/11/03/5mXuOu.jpg">
<meta property="og:image" content="https://s1.ax2x.com/2018/11/03/5mXJgA.jpg">
<meta property="og:image" content="https://s1.ax2x.com/2018/11/03/5mXhQO.jpg">
<meta property="og:image" content="https://s1.ax2x.com/2018/11/03/5mXyfe.jpg">
<meta property="og:image" content="https://s1.ax2x.com/2018/11/03/5mXaXd.jpg">
<meta property="og:image" content="https://s1.ax2x.com/2018/11/03/5mXcJR.jpg">
<meta property="og:updated_time" content="2018-11-05T10:18:08.482Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="【TGP】饥荒联机版专用服务器搭建教程">
<meta name="twitter:description" content="专用服务器搭建教程+mod">
<meta name="twitter:image" content="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/20637217.jpg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2018/11/03/jihuang.html"/>




	
<link href="//cdn.bootcss.com/animate.css/3.5.0/animate.min.css" rel="stylesheet">

  <title>【TGP】饥荒联机版专用服务器搭建教程 | 叶先森、</title>
  














</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">叶先森、</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">YJ Blog</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2018/11/03/jihuang.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="姓叶名先森">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="http://myyejun.oss-cn-shenzhen.aliyuncs.com/19-03-03/sucai15.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="叶先森、">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">【TGP】饥荒联机版专用服务器搭建教程</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-11-03T17:41:17+08:00">
                2018-11-03
              </time>
            

            

            
          </span>
<span>
    |
  <span>更新于</span>
  <time>
    2018-11-03
    22:11:40
  </time>
</span>
          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/game/" itemprop="url" rel="index">
                    <span itemprop="name">game</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          
             <span id="/2018/11/03/jihuang.html" class="leancloud_visitors" data-flag-title="【TGP】饥荒联机版专用服务器搭建教程">
               <span class="post-meta-divider">|</span>
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               
                 <span class="post-meta-item-text">阅读次数 </span>
               
                 <span class="leancloud-visitors-count"></span>
             </span>
          

          

          

          

        </div>
      </header>
    

    <div class="post-body" itemprop="articleBody">

      
      

      
        <p><img src="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/20637217.jpg" alt="此处输入图片的描述"></p>
<h1 id="专用服务器搭建教程 -mod"><a href="# 专用服务器搭建教程 -mod" class="headerlink" title="专用服务器搭建教程 +mod"></a> 专用服务器搭建教程 +mod</h1><h2 id=""><a href="#"class="headerlink"title=""></a><a id="more"></a></h2><p> 免得重复造轮子，参考链接：</p>
<blockquote>
<ul>
<li><a href="https://www.gamersky.com/handbook/201611/834493.shtml" target="_blank" rel="noopener">Anydong</a></li>
</ul>
</blockquote>
<hr>
<h2 id="ONE："><a href="#ONE：" class="headerlink" title="ONE："></a>ONE：</h2><h3 id="获取专用服务器令牌"><a href="# 获取专用服务器令牌" class="headerlink" title="获取专用服务器令牌"></a> 获取专用服务器令牌 </h3><p>1. 启动【饥荒联机版】并登陆游戏 </p>
<p><img src="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/21329989.jpg" alt=""></p>
<p>2. 点击游戏左下角【账户】按钮 </p>
<p><img src="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/7047361.jpg" alt=""></p>
<p>3. 然后点击橙色按钮【生成服务器票据】</p>
<p><img src="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/3853095.jpg" alt=""></p>
<p>4. 复制生成的票据 </p>
<p><img src="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/2896621.jpg" alt=""></p>
<hr>
<h2 id="TWO"><a href="#TWO" class="headerlink" title="TWO:"></a>TWO:</h2><h2 id="创建需要的文件"><a href="# 创建需要的文件" class="headerlink" title="创建需要的文件"></a> 创建需要的文件 </h2><p>1. 找到如下路径【文档 \Klei\DoNotStarveTogetherRail】</p>
<p><img src="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/618867.jpg" alt=""></p>
<p><img src="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/62837698.jpg" alt=""></p>
<p>2. 在当前目录下创建两个文件夹，不能为中文 <br>【dishang_01】（表示地上）</p>
<p>【dixia_01】（表示洞穴）</p>
<p><img src="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/4915956.jpg" alt=""></p>
<p>3. 创建文件【cluster_token.txt】</p>
<p> 把之前复制的票据粘贴进去 </p>
<p> 然后把【cluster_token.txt】文件分别放入【dishang_01】【dixia_01】文件夹里 </p>
<p>4. 分别在【dishang_01】【dixia_01】文件夹内创建【Master】文件夹 </p>
<p><img src="https://s1.ax2x.com/2018/11/03/5mXW02.jpg" alt=""></p>
<p>5. 创建文件【cluster.ini】代码如下：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div></pre></td><td class="code"><pre><div class="line">[GAMEPLAY]</div><div class="line">game_mode = survival  </div><div class="line">max_players = 6</div><div class="line">pvp = false </div><div class="line">pause_when_empty = true</div><div class="line">vote_kick_enabled = true</div><div class="line"></div><div class="line">[NETWORK]</div><div class="line">lan_only_cluster = false</div><div class="line">cluster_intention = cooperative</div><div class="line">cluster_description = ceshi</div><div class="line">cluster_name = 房间名称（不推荐用中文，会报错）</div><div class="line">offline_cluster = false</div><div class="line">cluster_password = 密码，请输入数字 </div><div class="line"></div><div class="line"></div><div class="line">[MISC]</div><div class="line">console_enabled = true</div><div class="line"></div><div class="line"></div><div class="line">[SHARD]</div><div class="line">shard_enabled = true</div><div class="line">bind_ip = 127.0.0.1</div><div class="line">master_ip = 127.0.0.1</div><div class="line">master_port = 10888</div><div class="line">cluster_key = defaultPass</div></pre></td></tr></table></figure>
<p> 配置参照：</p>
<p><img src="https://s1.ax2x.com/2018/11/03/5mXdaa.png" alt=""></p>
<p>6. 将文件【cluster.ini】放入【dishang_01】【dixia_01】文件夹 </p>
<p><img src="https://s1.ax2x.com/2018/11/03/5mXW02.jpg" alt=""></p>
<p>7. 在【dishang_01】文件夹内创建文件【server.ini】代码如下：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">[NETWORK]</div><div class="line">server_port = 11000</div><div class="line"></div><div class="line">[SHARD]</div><div class="line">is_master = true</div></pre></td></tr></table></figure>
<hr>
<h2 id="THREE"><a href="#THREE" class="headerlink" title="THREE:"></a>THREE:</h2><h3 id="添加 mod"><a href="# 添加 mod" class="headerlink" title="添加 mod"></a> 添加 mod</h3><p>1. 首先进入游戏创建房间，把你需要的东西都加上, 点击右下角生成世界 </p>
<p><img src="https://s1.ax2x.com/2018/11/03/5mXjfz.jpg" alt=""></p>
<p>2. 进入 DoNotStarveTogetherRail 文件夹下你的 id（随机生成的 id）文件夹 </p>
<p><img src="http://myyejun.oss-cn-shenzhen.aliyuncs.com/18-11-3/4915956.jpg" alt=""></p>
<p>3. 进入那一串数字文件夹，只有一个世界的话就一个是 Cluster_1，第二个是 Cluster_2，以此类推 </p>
<p><img src="https://s1.ax2x.com/2018/11/03/5mXMTS.jpg" alt=""></p>
<p>4. 进入【Master】文件夹, 复制里面的【save】文件夹和【leveldataoverride.lua】文件和【modoverrides.lua】文件，三个，放入【dishang_01】【dixia_01】内的【Master】文件夹内 </p>
<p><img src="https://s1.ax2x.com/2018/11/03/5mXbIH.jpg" alt=""></p>
<p>5. 在【dixia_01】文件夹内创建文件【server.ini】代码如下 </p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div></pre></td><td class="code"><pre><div class="line">[NETWORK]</div><div class="line"></div><div class="line">　　server_port = 10998</div><div class="line"></div><div class="line">　　[SHARD]</div><div class="line"></div><div class="line">　　is_master = false</div><div class="line"></div><div class="line">　　name = Caves</div><div class="line"></div><div class="line">　　id = 1205614392</div><div class="line"></div><div class="line">　　[STEAM]</div><div class="line"></div><div class="line">　　master_server_port = 27017</div><div class="line"></div><div class="line">　　authentication_port = 8767</div></pre></td></tr></table></figure>
<p> 这里的 id = 1205614392 数字为世界编号最好是更改，更改值为任意数字，只要位数正确即可，10 位数。以防别人连接到你的洞穴世界 </p>
<p> 有些是系统会自动生成的，不用理 </p>
<hr>
<h2 id="FOUR"><a href="#FOUR" class="headerlink" title="FOUR:"></a>FOUR:</h2><p>1. 安装【饥荒联机版专用服务器】</p>
<p><img src="https://s1.ax2x.com/2018/11/03/5mXuOu.jpg" alt=""></p>
<p>2. 打开，然后点击注册证书，设置密码 </p>
<p><img src="https://s1.ax2x.com/2018/11/03/5mXJgA.jpg" alt=""></p>
<hr>
<h2 id="FIVE"><a href="#FIVE" class="headerlink" title="FIVE:"></a>FIVE:</h2><p>1. 进入饥荒安装路径。我的是 e 盘 </p>
<p><img src="https://s1.ax2x.com/2018/11/03/5mXhQO.jpg" alt=""></p>
<p>2. 选择【饥荒：联机版】文件夹 </p>
<p> 复制里面的 mods 文件夹到【饥荒联机版专用服务器】文件夹里 </p>
<p><img src="https://s1.ax2x.com/2018/11/03/5mXyfe.jpg" alt=""></p>
<p><img src="https://s1.ax2x.com/2018/11/03/5mXaXd.jpg" alt=""></p>
<h2 id="FIVE-1"><a href="#FIVE-1" class="headerlink" title="FIVE:"></a>FIVE:</h2><p>1. 启动联机版专用服务器。然后进入游戏搜索房间即可 </p>
<p><img src="https://s1.ax2x.com/2018/11/03/5mXcJR.jpg" alt=""></p>
<hr>
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="330" height="86" src="//music.163.com/outchain/player?type=2&id=29755058&auto=1&height=66"></iframe>


      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

<div>
  
    
<div style="text-align:center;color: #CDBA96;font-size:14px;">
------ The Happy Ending ------</div>

  
</div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/jihuang/" rel="tag"># jihuang</a>
          
            <a href="/tags/game/" rel="tag"># game</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/05/25/english1.html" rel="next" title="做一个努力的人吧">
                <i class="fa fa-chevron-left"></i> 做一个努力的人吧
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/11/03/erji.html" rel="prev" title="备考计算机二级 java">
                备考计算机二级 java <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
      <div id="lv-container" data-id="city" data-uid="MTAyMC8zNjEyNi8xMjY2MQ=="></div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="http://myyejun.oss-cn-shenzhen.aliyuncs.com/19-03-03/sucai15.jpg"
               alt="姓叶名先森" />
          <p class="site-author-name" itemprop="name">姓叶名先森</p>
           
              <p class="site-description motion-element" itemprop="description">谁的等待恰逢花开</p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/archives/">
                <span class="site-state-item-count">5</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-categories">
              <a href="/categories/index.html">
                <span class="site-state-item-count">4</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">8</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/myyejun" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://weibo.com/yejun1997" target="_blank" title="微博">
                  
                    <i class="fa fa-fw fa-weibo"></i>
                  
                  微博
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://douban.com/people/143349932" target="_blank" title="豆瓣">
                  
                    <i class="fa fa-fw fa-telegram"></i>
                  
                  豆瓣
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://www.zhihu.com/people/myyejun" target="_blank" title="知乎">
                  
                    <i class="fa fa-fw fa-book"></i>
                  
                  知乎
                </a>
              </span>
            
          
        </div>

        
        

        
        
          <div class="links-of-blogroll motion-element links-of-blogroll-inline">
            <div class="links-of-blogroll-title">
              <i class="fa  fa-fw fa-link"></i>
              友情链接
            </div>
            <ul class="links-of-blogroll-list">
              
                <li class="links-of-blogroll-item">
                  <a href="http://yejun.cf/" title="叶先森" target="_blank">叶先森</a>
                </li>
              
            </ul>
          </div>
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#专用服务器搭建教程 -mod"><span class="nav-number">1.</span> <span class="nav-text"> 专用服务器搭建教程 +mod</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#"><span class="nav-number">1.1.</span> <span class="nav-text"></span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#ONE："><span class="nav-number">1.2.</span> <span class="nav-text">ONE：</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#获取专用服务器令牌"><span class="nav-number">1.2.1.</span> <span class="nav-text"> 获取专用服务器令牌 </span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#TWO"><span class="nav-number">1.3.</span> <span class="nav-text">TWO:</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#创建需要的文件"><span class="nav-number">1.4.</span> <span class="nav-text"> 创建需要的文件 </span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#THREE"><span class="nav-number">1.5.</span> <span class="nav-text">THREE:</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#添加 mod"><span class="nav-number">1.5.1.</span> <span class="nav-text"> 添加 mod</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#FOUR"><span class="nav-number">1.6.</span> <span class="nav-text">FOUR:</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#FIVE"><span class="nav-number">1.7.</span> <span class="nav-text">FIVE:</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#FIVE-1"><span class="nav-number">1.8.</span> <span class="nav-text">FIVE:</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">姓叶名先森</span>
</div>


<div class="powered-by">
  &nbsp;|&nbsp;&nbsp;  And lonely again.
</div>

<div class="theme-info">
  南风过境 &nbsp;-----&nbsp;十里春风不如你
</div>

<div style="float:left">
<a href="https://pages.coding.me" style="font-weight: bold">Coding Pages</a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>

  
  <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.1"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.1"></script>



  


  




	





  





  





  
    <script type="text/javascript">
      (function(d, s) {
        var j, e = d.getElementsByTagName(s)[0];
        if (typeof LivereTower === 'function') { return; }
        j = d.createElement(s);
        j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
        j.async = true;
        e.parentNode.insertBefore(j, e);
      })(document, 'script');
    </script>
  






  





  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
  <script>AV.initialize("TR7QphxVBi0j1Yo036dkCq0T-gzGzoHsz", "Su1nSA0pOiv3Ifiqae2uueam");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



  

  

  

  
  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
  <script>AV.initialize("TR7QphxVBi0j1Yo036dkCq0T-gzGzoHsz", "Su1nSA0pOiv3Ifiqae2uueam");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");
      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });
      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';
		  var UPDATED_AT = '.leancloud-updated-at';
          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }
          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
			var updatedT = item.updatedAt;
            var element = document.getElementById(url);
            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
			if(updatedAtContent.text() == '') {
              updatedAtContent.text('无人浏览');
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }
    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);
      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }
    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>

  

  


</body>
</html>
